package cn.iocoder.yudao.module.erp.controller.admin.purpurchaseorder.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - ERP 采购单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PurPurchaseOrderRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32452")
    @ExcelProperty("编号")
    private String id;

    @Schema(description = "采购单编号-提交供应商采购单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "764")
    @ExcelProperty("采购单编号-提交供应商采购单编号")
    private String purchaseOrderId;

    @Schema(description = "一级库整合单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8200")
    @ExcelProperty("一级库整合单编号")
    private String integrateId;

    @Schema(description = "是否主单", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否主单", converter = DictConvert.class)
    @DictFormat("is_main_order") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer isMainOrder;

    @Schema(description = "主单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17009")
    @ExcelProperty("主单编号")
    private String mainOrderId;

    @Schema(description = "采购时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("采购时间")
    private LocalDateTime orderTime;

    @Schema(description = "供应商编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26165")
    @ExcelProperty("供应商编号")
    private Long supplierId;

    @Schema(description = "合计价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "29324")
    @ExcelProperty("合计价格")
    private BigDecimal totalPrice;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    @DictFormat("purchase_apply_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "订单完成状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "订单完成状态", converter = DictConvert.class)
    private Integer isFinished;

    @Schema(description = "流程实例的编号", example = "29753")
    @ExcelProperty("流程实例的编号")
    private String processInstanceId;

    @Schema(description = "创建者")
    @ExcelProperty("创建者")
    private String creator;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "订单整合编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17009")
    @ExcelProperty("订单整合编号")
    private String orderIntegrateId;
}